package com.ztq.test.userinfo.service;

import java.util.List;

import com.ztq.test.login.entity.T_userInfo;
import com.ztq.test.userinfo.dao.UserHandlerDao;
import com.ztq.test.userinfo.entity.T_friends;
import com.ztq.test.userinfo.util.UserHandlerUtil;

/**
 * @author: ztq
 * @date: 2016-2-1 下午04:30:38
 * @description: 这个service类主要提供一些方法来获取用户的一些信息，包括用户个人信息、
 *               用户好友信息、好友聊天信息等
 * @version:1.0
 */
public class UserHandlerServiceIMPL implements UserHandlerService {
	private UserHandlerDao userHandlerDao;
	
	public UserHandlerDao getUserHandlerDao() {
		return userHandlerDao;
	}

	public void setUserHandlerDao(UserHandlerDao userHandlerDao) {
		this.userHandlerDao = userHandlerDao;
	}

	//获取用户的好友信息
	public String fetchUserFriendship(T_friends friends){
		List<T_userInfo> list = userHandlerDao.fetchUserFriendship(friends);
		String result = UserHandlerUtil.getUserFriendshipInfoJson(list);
		return result;
	}
}